package com.egg.demo.service;

import cn.hutool.core.util.RandomUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class WebsocketService {


    /**
     * 获取用户总人数
     *
     * @return
     */
    public Integer userTotal() {
        return RandomUtil.randomInt(1000, 5000);
    }

    /**
     * 获取用户在线人数
     */
    public Integer userOnline() {
        return RandomUtil.randomInt(500, 1000);
    }


}
